#include "Hand.h"
//#include "interface.h"

Hand::Hand()
{
//	m_pHandPointList.resize(m_frameNum);
}

Hand::Hand(const Hand &h)
{

}

Hand& Hand::operator =(const Hand &h)
{
	return *this;
}

int Hand::getHandDirection()
{
	return GESTURE_LEFT;
}

int Hand::getHandPointNum()
{
	return m_pHandPointList.size();
}

void Hand::getHandPoint()
{
	if (getHandPointNum() == 0)
	{
		cout << "No Hand Point" << endl;
	}
	else 
	{
		for(list<const XnVHandPointContext>::iterator first = m_pHandPointList.begin(); first != m_pHandPointList.end(); ++first)
		{
			cout << "Hand Point X Coordinate : " << first->ptPosition.X 
				 << " Hand Point Y Coordinate : " << first->ptPosition.Y << endl;
		}
	}
}

int Hand::receiveHandPoint(const XnVHandPointContext *php)
{
	m_pHandPointList.push_back(*php);
	return m_pHandPointList.size();
}

void Hand::releaseHandPointList()
{
	list<const XnVHandPointContext>::iterator first = m_pHandPointList.begin();
	list<const XnVHandPointContext>::iterator end   = m_pHandPointList.end();
	m_pHandPointList.erase(first, end);
}

Hand::~Hand()
{

}